package com.xwn.demo;

public class PrototypeDemo implements Cloneable{
    public static void main(String[] args) throws CloneNotSupportedException {
        PrototypeDemo demo = new PrototypeDemo();
        Object copy = demo.clone();
        System.out.println(demo == copy);
        System.out.println(demo.equals(copy));
        System.out.println(demo.getClass() == copy.getClass());
        System.out.println(copy instanceof PrototypeDemo);
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }
}
